package com.demo.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 预防药物表
 * @author ZM
 * @since 2020-11-20
 */
@Data
@TableName("pd_medicine")
@ApiModel(value="Medicine对象", description="预防药物表")
public class Medicine implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "药物编号")
    @TableId(value = "medicine_id", type = IdType.AUTO)
    private Integer medicineId;

    @ApiModelProperty(value = "类目(型)编号")
    @TableField("medicine_cate_id")
    @NotNull(message = "类目(型)编号不能为空")
    private Integer medicineCateId;

    @ApiModelProperty(value = "药物名称")
    @TableField("medicine_name")
    @NotBlank(message = "药物名称不能为空")
    private String medicineName;

    @ApiModelProperty(value = "是否出院  1.出院   2.不出院")
    @TableField("discharge")
    private Integer discharge;

    @ApiModelProperty(value = "推荐剂量")
    @TableField("recommend_dosage")
    @NotBlank(message = "推进剂量不能为空")
    private String recommendDosage;

    @ApiModelProperty(value = "单位")
    @TableField("unit")
    @NotBlank(message = "单位不能为空")
    private String unit;

    @ApiModelProperty(value = "推荐用法")
    @TableField("way")
    @NotBlank(message = "推荐用法不能为空")
    private String way;

    @ApiModelProperty(value = "推荐频率")
    @TableField("way_gap")
    @NotBlank(message = "推荐频率不能为空")
    private String wayGap;

    @ApiModelProperty(value = "排序号小在前大在后")
    @TableField("item_sort")
    @NotNull(message = "排序号小在前大在后")
    private Integer itemSort;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    @ApiModelProperty(value = "创建人ID")
    @TableField("created_user_id")
    @NotNull(message = "创建人ID不能为空")
    private Integer createdUserId;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "updated_time",fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedTime;

    @ApiModelProperty(value = "更新人ID")
    @TableField("updated_user_id")
    private Integer updatedUserId;

    @ApiModelProperty(value = "删除时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("deleted_time")
    private Date deletedTime;

    @ApiModelProperty(value = "删除人ID")
    @TableField("deleted_user_id")
    private Integer deletedUserId;


}
